package service_manage

import (
	"game-time-management/process_management"
	"game-time-management/types"
	"log"

	"github.com/kardianos/service"
)

type MyProgram struct{}

func (p *MyProgram) Start(s service.Service) error {
	log.Println("starting...")
	go p.run()
	return nil
}
func (p *MyProgram) Stop(s service.Service) error {
	log.Println("stopping...")
	return nil
}
func (p *MyProgram) run() {
	log.Println("running...")
	statusExe := make(types.StatusExe)
	for _, name := range types.ExeName {
		statusExe[name] = false
	}
	process_management.Process(&statusExe)
}
